package cn.zhy.fegin;

import cn.zhy.domain.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class UserFeignClientFallback implements UserFeignClient {

    //日志打印器
    private Logger log = LoggerFactory.getLogger(UserFeignClientFallback.class);

    @Override
    public User getById(Long id) {
        log.info("服务不可用");
        return new User(2L,"宝贝返回托底数据了","哦豁");
    }
}
